package com.study.mike.result;

/**
 * @author Kh
 */
public enum Code {

    SUCCESS(200, "请求成功"),
    FAIL(400, "处理失败"),
    UNAUTHORIZED(401, "未进行身份认证！"),
    FORBIDDEN(403, "访问未授权!"),
    RESOURCE_NOT_FOUND(404, "资源未找到！"),
    ERROR(500, "系统异常"),
    SERVICE_UNAVAILABLE(503, "系统维护中...");

    private Integer code;
    private String msg;

    private Code(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return this.code;
    }

    public String getMsg() {
        return this.msg;
    }
}
